package com.wemei.auto.ui.tool.image.select.service

import com.luck.picture.lib.basic.PictureSelectionModel
import com.luck.picture.lib.config.SelectMimeType
import com.wemei.auto.ui.tool.image.select.domain.ImageSelectBean

interface IImageSelect {
    fun selectImage(config: (ImageUploadUBuilder.() -> Unit)? = null)

    fun preview(position: Int, list: MutableList<ImageSelectBean>)
}

typealias OnUploadSuccessListener = ((MutableList<ImageSelectBean>?) -> Unit)?
typealias OnCancelSuccessListener = (() -> Unit)?

class ImageUploadUBuilder {
    var onUploadSuccessListener: OnUploadSuccessListener = null
    var onCancelSuccessListener: OnCancelSuccessListener = null
    var cutOut = false
    var isMultipleChoice = true
    var isUp = false
    var isCompress = true
    var selectCount = 9
    var columnCount = 3
    var md5 = false
    var selectMimeType: Int = SelectMimeType.ofImage()
    var pictureConfig: ((PictureSelectionModel.() -> Unit))? = null
}